home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / PfTypLs.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  5.7 KB  |  234 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: PfTypLs.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODPlatformTypeList_xh
  18. #define SOM_ODPlatformTypeList_xh
  19.  
  20. class ODPlatformTypeList;
  21.  
  22. #define ODPlatformTypeList_MajorVersion 1
  23. #define ODPlatformTypeList_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODPlatformTypeList_API
  35. #define ODPlatformTypeList_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODPlatformTypeList;
  50. class ODPlatformTypeListIterator;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODPlatformTypeListCClassData ODPlatformTypeListClassData
  58. #define ODPlatformTypeListNewClass(major,minor) somNewVersionedClassReference(ODPlatformTypeList,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODPlatformTypeListMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODPlatformTypeList class object, and the methods it introduces. */
  69. SOMEXTERN struct ODPlatformTypeListClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken AddLast;
  79.     somMToken Remove;
  80.     somMToken Contains;
  81.     somMToken Count;
  82.     somMToken CreatePlatformTypeListIterator;
  83.     somMToken reserved1;
  84.     somMToken reserved2;
  85. } SOMDLINK ODPlatformTypeListClassData;
  86.  
  87. #if PRAGMA_ALIGN_SUPPORTED
  88. #  pragma options align=reset
  89. #endif
  90.  
  91. #if !defined(ODPlatformTypeList_Class_Source) && !defined(SOM_Module_pftypls_Source)
  92. #if PRAGMA_IMPORT_SUPPORTED
  93. #pragma import list ODPlatformTypeListClassData
  94. #endif
  95. #endif
  96.  
  97.  
  98. /*
  99.  * -- Typedefs and inline method declarations for left path inherited methods
  100.  * -- are omitted because this compilation had -museinheritedmethods in effect
  101.  */
  102.  
  103.  
  104. /*
  105.  * -- Typedefs for ODPlatformTypeList Method Procedures
  106.  */
  107. SOMEXTERN {
  108. typedef void   (* SOMLINK somTD_ODPlatformTypeList_AddLast)(ODPlatformTypeList *somSelf, Environment *ev,
  109.         ODPlatformType type);
  110. typedef void   (* SOMLINK somTD_ODPlatformTypeList_Remove)(ODPlatformTypeList *somSelf, Environment *ev,
  111.         ODPlatformType type);
  112. typedef ODBoolean   (* SOMLINK somTD_ODPlatformTypeList_Contains)(ODPlatformTypeList *somSelf, Environment *ev,
  113.         ODPlatformType type);
  114. typedef ODULong   (* SOMLINK somTD_ODPlatformTypeList_Count)(ODPlatformTypeList *somSelf, Environment *ev);
  115. typedef ODPlatformTypeListIterator*   (* SOMLINK somTD_ODPlatformTypeList_CreatePlatformTypeListIterator)(ODPlatformTypeList *somSelf, Environment *ev);
  116. }
  117.  
  118. #endif /* ODPlatformTypeList_API */
  119.  
  120.  
  121. /*
  122.  * -- This emitter treats Method Tokens as Thunks by default.
  123.  * -- Use the sc modifier "nothunks" to change this default
  124.  */
  125. #undef somresolve_
  126. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  127.  
  128. /*
  129.  * -- The C++ Wrapper Class for ODPlatformTypeList
  130.  */
  131. class ODPlatformTypeList : public ODObject
  132. {
  133. public:
  134.  
  135. // ODPlatformTypeList::new registers use of the class object, and then uses somNew
  136. // to allocate memory and load the object method table pointer. 
  137. void *operator new(size_t size)
  138. {
  139.     SOM_IgnoreWarning(size);
  140.     // Allocate memory using the default allocator for ODPlatformTypeList, and
  141.     // clear mem & set method table pointer, call basic initialization
  142. #ifdef SOMCHKNULL
  143.     void * __somResult = (void *)
  144.       somNewObject(ODPlatformTypeList);
  145.     SOMCHKNULL(__somResult);
  146.     return __somResult;
  147. #else
  148.     return (void*) somNewObject(ODPlatformTypeList);
  149. #endif
  150. }
  151.  
  152. // ODPlatformTypeList::delete uses the default deallocator for the object's class.
  153. void operator delete(void * obj)
  154. {
  155.     if (obj) {
  156.         SOM_Resolve(obj,SOMObject,somFree)
  157.            ( (SOMObject*) obj );
  158.     }
  159. }
  160.  
  161. /* method: AddLast */
  162. void   AddLast(Environment *ev,
  163.         ODPlatformType type)
  164. {
  165.    SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,AddLast)
  166.     (this,ev,type);
  167. #ifdef SOMCHKEXCEPT
  168.       SOMCHKEXCEPT;
  169. #endif
  170. }
  171.  
  172. /* method: Remove */
  173. void   Remove(Environment *ev,
  174.         ODPlatformType type)
  175. {
  176.    SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,Remove)
  177.     (this,ev,type);
  178. #ifdef SOMCHKEXCEPT
  179.       SOMCHKEXCEPT;
  180. #endif
  181. }
  182.  
  183. /* method: Contains */
  184. ODBoolean   Contains(Environment *ev,
  185.         ODPlatformType type)
  186. {
  187.    #ifdef SOMCHKEXCEPT
  188.    ODBoolean __somResult = 
  189.       SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,Contains)
  190.     (this,ev,type);
  191.       SOMCHKEXCEPT;
  192.    return __somResult;
  193. #else
  194.    return SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,Contains)
  195.     (this,ev,type);
  196. #endif
  197. }
  198.  
  199. /* method: Count */
  200. ODULong   Count(Environment *ev)
  201. {
  202.    #ifdef SOMCHKEXCEPT
  203.    ODULong __somResult = 
  204.       SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,Count)
  205.     (this,ev);
  206.       SOMCHKEXCEPT;
  207.    return __somResult;
  208. #else
  209.    return SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,Count)
  210.     (this,ev);
  211. #endif
  212. }
  213.  
  214. /* method: CreatePlatformTypeListIterator */
  215. ODPlatformTypeListIterator*   CreatePlatformTypeListIterator(Environment *ev)
  216. {
  217.    #ifdef SOMCHKEXCEPT
  218.    ODPlatformTypeListIterator* __somResult = 
  219.       SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,CreatePlatformTypeListIterator)
  220.     (this,ev);
  221.       SOMCHKEXCEPT;
  222.    return __somResult;
  223. #else
  224.    return SOM_ResolveD(this,ODPlatformTypeList,ODPlatformTypeList,CreatePlatformTypeListIterator)
  225.     (this,ev);
  226. #endif
  227. }
  228.  
  229. };   /* ODPlatformTypeList */
  230.  
  231.  
  232.  
  233. #endif       /* SOM_ODPlatformTypeList_xh */
  234.